﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Security.Cryptography;
using System.Text;

namespace wuliuback
{
    public partial class DeleteGoods : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string goodsId = Request["goods_id"];
            string status="-1";

            string code = "";
            string msg = "";


            String sql = "";
            DbHelper dbHelper = new DbHelper();
            sql = "update t_goods set status="+status +" where goods_id="+goodsId;
            if (dbHelper.Update(sql))
            {
                code = "0";
                msg = "删除成功";
            }
            else
            {
                code = "-1";
                msg = "没有该货源信息";
            }
            
            Response.Output.WriteLine("{\"code\":\""+code+"\",\"msg\":\""+msg+"\"}");
        }
    }
}
